{extend name="public/base"/}

{block name="body"}


<style>

.mui-table-view-cell p {

    margin-bottom: 0;

    font-size: 12px;

}

.mui-table-view .mui-media-object {

    line-height: 42px;

    width: 60px !important;

        max-width: 60px;

    height: 60px;

}

.mui-card-header {

    font-size: 12px;

    border-radius: 2px 2px 0 0;

        padding: 5px 10px;

}

</style>

<header class="mui-bar mui-bar-nav">

  <!-- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> -->

  <h1 class="mui-title">最新订单</h1>

</header>

<div class="mui-content" style="    margin-bottom: 100px;">
			<div>
			<form method="get">
				<div>
					备注|地址|名字：<input type="text" class="form-control" name="remarkbak" value="{$Think.get.remarkbak}" placeholder="请输入地址/备注/名字">
				
				开始时间：<input type="date" class="form-control" name="start" value="{$Think.get.start}" placeholder="瀵拷婵妞傞梻锟�">
										
						结束时间：<input type="date" class="form-control" name="end" value="{$Think.get.end}" placeholder="缂佹挻娼弮鍫曟？">
											
								
				
              
					 <button class="btn btn-primary" type="submit">搜索</button>
				</div>
			
			</form>
		</div>
		
			<div>
	<span>商品总价格({$shopsSum})</span>
           <span>代理价额({$dlpritotalSum})</span>
           
         
          
      </div>

      

  {volist name="list" id="vo"}

    <div class="mui-card">

      	<div class="mui-card-header ">

          <!--<div class="mui-ellipsis mui-col-xs-8">订单编号：{$vo['out_trade_no']}</div>-->
          <div class="mui-ellipsis mui-col-xs-8">订单编号：{$vo['id']}</div>
          {eq name="$vo['buystatus']" value='1'}
<!--<div class="mui-col-xs-4 mui-text-right"><a href="{:url('index/order/shipments',array('id'=>$vo['id'],'note'=>1))}" onclick="if(confirm('确定发货?')==false)return false;" class="confirm ajax-get">发货</a></div>-->
<div class="mui-col-xs-4 mui-text-right"><a href="javascript:;" data-toggle="modal" data-target="#myModal2" data-id="{$vo['id']}" >发货</a></div>


{/eq}
 {eq name="$vo['buystatus']" value='3'}
<div class="mui-col-xs-4 mui-text-right" style='color:red'>{$vo['name']}已发货</div>
 {/eq}
          <div class="mui-col-xs-4 mui-text-right"><button  type="button" class="mui-btn qxdd mui-btn-primary mui-btn-outlined" style="font-size:12px;">{$vo['buystatus']|parse_config_value='pay_status'}</button></div>

        </div>

      	<div class="mui-card-content">

      		<div class="mui-card-content-inner" style="    padding: 5px 0;">



            <ul class="mui-table-view mui-table-view-chevron">

                <li class="mui-table-view-cell mui-media" onclick='window.location.href = "{:url('index/order/detail',array('id'=>$vo['id']))}"'>

                    <a class="mui-navigate-right">

                        <img class="mui-media-object mui-pull-left" src="{$vo['cover_id']|get_cover='path'}">

                        <div class="mui-media-body">

                            <div style='color:red'>¥{$vo['total']}____运费：¥{$vo['yunfei']}</div>

                            <p >下单时间：{$vo['create_time']}</p>

                            <p>收货时间：{$vo['group_time']} {$vo['deliverytime']}</p>

                            <p>订单类型：

                              {eq name="$vo.index_type" value="1"}

                                  团购

                              {/eq}

                              {eq name="$vo.index_type" value="0"}

                                及时配送

                              {/eq}

                            </p>

                            <p>收货人：{$vo.user_name}   <br /> 
                            	收货地址：{$vo.address}   <br />
                            	微信：{$vo.nick_name}

                            </p>
                             

                            <p>备注：{$vo.remark} 
                             

                            </p>

                        </div>

                    </a>

                </li>



            </ul>





        	</div>

      </div>

    </div>

  {/volist}

  {$list->muirender()}

   <div class="modal fade "  id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-sm">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
              <h4 class="modal-title" id="myModalLabel">运费详细情况</h4>
            </div>
						<form class="form-horizontal2" action="{:url('index/order/shipmentstest')}" method="post">
	            <div class="modal-body">
	              <div>运费金额：<input type="text" name="yunfei" class="form-control" value="0" style=" width: 60px;text-align: center;" /></div>
								<div>
									<span>运费说明：</span>
									<textarea name="yunfeidetail" class="form-control"></textarea>
								</div>
													<input type="hidden" name="id" value="">
	            </div>
	            <div class="modal-footer">
	              <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
	              <button type="submit" class="btn btn-primary submit-btn ajax-post"  target-form="form-horizontal2">确定</button>
	            </div>
						</form>
          </div>
        </div>
      </div>
			<script>
			 $(function(){
				 $('#myModal2').on('show.bs.modal', function (e) {
				 	
						var id = $(e.relatedTarget.outerHTML).attr('data-id');
						$(e.target).find('[name="id"]').val(id);
						
						
				 })
			 })
			</script>

</div>



{/block}

